package com.zyq.controller;

import com.zyq.mapper.SearchWordMapper;
import com.zyq.model.common.ResponseBean;
import com.zyq.model.request.TopicDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: zyq
 * @create: 2022-04-02
 **/


@Api( tags = "热搜词接口")
@RestController
@RequestMapping("/word")
public class searchWordController {

    @Autowired
    private SearchWordMapper searchWordMapper;

    @ApiOperation("获取热搜词")
    @GetMapping
    public ResponseBean searchWord(){
        return new ResponseBean(200,"查询成功",searchWordMapper.selectWord());
    }
}
